package com.comleader.ldmapdownload.controller;

import com.comleader.ldmapdownload.util.map.GdalUtil;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author 张志航
 * @description 测绘服务
 * @date 2020-11-27 16:06
 */
@RestController
@RequestMapping("/measure")
public class MeasureController {


    @GetMapping("/getAltitude/{lng}/{lat}")
    public Integer getAltitude(@PathVariable("lng")double lng,@PathVariable("lat")double lat){

        if (lng <= 0 || lat<=0){
            return 0;
        }
        return GdalUtil.getAltitude(lng,lat);

    }

}
